
<div class="box box-solid">
    <div class="box-header">
    <div >
        <form role="form" action="/admin/user/applylist" method="get">
            <div class="input-group">
                    <?php $status = Yii::app()->request->getQuery('status');?>
                    <label class="pull-right">
                        <select name="status" class="form-control input-sm ">
                        <option <?php if(empty($status))echo 'selected';?> value="">--选择申请--</option>
                        <option <?php if($status==1)echo 'selected';?> value="1" >查看新申请</option>
                        <option <?php if($status==2)echo 'selected';?> value="2">已同意申请</option>
                        <option <?php if($status==3)echo 'selected';?> value="3">已驳回申请</option>
                        </select>
                    </label>

                    <input type="hidden" name="sid" value="<?php echo Yii::app()->request->getQuery('sid')?>"/>
                    <div class="input-group-btn">
                        <button class="btn btn-sm btn-primary"  >搜索<i class="fa fa-search"></i></button>
                        <a href="/admin/user/applylist" class="btn btn-sm btn-default">清空条件</a>
                    </div>
            </div>
        </form>
    </div>
</div>
</div>


        <table class="table table-hover table-bordered">

            <tr>
                <th>账号</th>
                <th>认证类型</th>
                <th>申请时间</th>
                <th>处理状态</th>
                <th class="align-center">操作</th>
            </tr>
   <?php if(!empty($re)): ?>
      <?php foreach ($re['data'] as $key => $value) : ?>
        <tr>

            <td><a target="_blank" href="/admin/user/info/sid/<?php echo $value['user_id'] ?>"><?php if(!empty($value['user_id'])){echo $value['mobile'];} ?></a></td>

            <td><?php if($value['type']==1){
                echo '认证个人货主';
            }elseif($value['type']==2){
                echo '认证企业货主';
            }elseif($value['type']==3){
                echo '认证个人承运人';
            }elseif($value['type']==4){
                echo '认证企业承运人';
            }else{
                echo '';
            }
            ;?></td>


            <td><?php echo date('Y-m-d H:i',$value['ctime']);?></td>

            <td><?php if($value['status']==1){
                echo '<b style="color:green">新申请</b>';
            }elseif($value['status']==2){
                echo '申请成功';
            }elseif($value['status']==3){
                echo '<b style="color:orange">已驳回</b>';
            }elseif($value['status']==4){
                echo '已失效';
            }else{
                echo '';
            }
            ;?></td>

            <td class="align-center tool-bar">

                    <?php if($value['type']==3||$value['type']==4):?>
                     <a  href="<?php echo $this->createUrl('user/carryadd/id/'.$value['id']); ?>">详情</a>
                 <?php else:?>
                     <a  href="<?php echo $this->createUrl('user/shipperapply/id/'.$value['id']); ?>">详情</a>
                 <?php endif;?>
            </td>
        </tr>
            <?php endforeach;?>
        <?php endif;?>
        </table>
    <a class="btn btn-default pull-left" href="<?php echo $this->createUrl('user/list') ?>"> 返回用户列表</a>
    <a class="btn btn-default pull-left" href="<?php echo $this->createUrl('user/applylist') ?>"> 返回申请列表</a>
    <div class="box-footer clearfix">
    <?php if(!empty($re['data'])): ?>
        <?php $this->widget('BLinkPager', array('pages'=>$re['pager'])); ?>
    <?php endif; ?>
    </div>

